home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Reference Guide
/
C-C++ Interactive Reference Guide.iso
/
c_ref
/
csource3
/
115_01
/
ed6.ccc
< prev
next >
Wrap
Text File
|
1979-12-31
|
2KB
|
131 lines
/*
Screen editor: terminal output module
Source: ed6.ccc
This file was created by the configuration program:
Version 2: September 6, 1981.
*/
/*
Define the current coordinates of the cursor.
*/
int outx, outy;
/*
Return the current coordinates of the cursor.
*/
outgetx()
{
return(outx);
}
outgety()
{
return(outy);
}
/*
Output one printable character to the screen.
*/
outchar(c) char c;
{
syscout(c);
outx++;
return(c);
}
/*
Position cursor to position x,y on screen.
0,0 is the top left corner.
*/
outxy(x,y) int x,y;
{
outx=x;
outy=y;
syscout(27);
syscout('=');
syscout(x+32);
syscout(y+32);
}
/*
Erase the entire screen.
Make sure the rightmost column is erased.
*/
outclr()
{
int k;
k=0;
while (k<SCRNL) {
outxy(0,k++);
outdelln();
}
outxy(0,0);
}
/*
Delete the line on which the cursor rests.
Leave the cursor at the left margin.
*/
outdelln()
{
outxy(0,outy);
outdeol();
}
/*
Delete to end of line.
Assume the last column is blank.
*/
outdeol()
{
syscout(27);
syscout('E');
}
/*
Return yes if terminal has indicated hardware scroll.
*/
outhasup()
{
return(YES);
}
outhasdn()
{
return(YES);
}
/*
Scroll the screen up.
Assume the cursor is on the bottom line.
*/
outsup()
{
/* auto scroll */
outxy(0,SCRNL1);
syscout(10);
}
/*
Scroll screen down.
Assume the cursor is on the top line.
*/
outsdn()
{
/* auto scroll */
outxy(0,0);
syscout(27);
syscout('^');
}